<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateProvidersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('providers', function (Blueprint $table) {
            $table->string('id', 45)->primary()->comment('ID');
            $table->string('code', 45)->comment('代码');
            $table->string('brand_name', 45)->comment('品牌名称');
            $table->string('company_name', 45)->comment('企业名称');
            $table->tinyInteger('status')->nullable()->default(0)->comment('0 未认证 1 已认证 -1 已过期 -9 已废弃');
            $table->integer('sort')->nullable()->default(0)->comment('排序权重');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('providers');
    }
}
